﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMSServices.Helpers;
using SMSConnector.Authentication;

namespace SMSServices.Sender
{
    /// <summary>
    /// For sending sms messages
    /// </summary>
    public static class MessageSender
    {
        /// <summary>
        /// Sends alert message to user from ipipi gateway
        /// </summary>
        /// <param name="ipipiUsername">Username on ipipi service</param>
        /// <param name="ipipiPassword">Password on ipipi service</param>
        /// <param name="recipient">Recipient phone number</param>
        /// <param name="message">SMS message</param>
        public static void SendMessageFromIPIPI(string ipipiUsername, string ipipiPassword, string recipient, string message)
        {
            AuthenticationParameters parameters = AuthorizationHelper.GetAuthParameters(ipipiUsername,ipipiPassword);
            SMSConnector.Helpers.Sender.SendSMS(SMSConnector.SMSService.SmsEncoding.Sixteen,
                parameters.Token, parameters.Signature,recipient,message);
        }
    }
}
